package pro.spring.controller.backController;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import pro.spring.model.Udiscuss;
import pro.spring.vo.PaginationVo;


@Controller
@RequestMapping("disc")
public class DiscussController extends BaseController{
	
	private String local = "page/back/discuss/";
	
	private Integer pagesize = 10 ;
	
	private PaginationVo<Udiscuss> pagelist ;
	
	@RequestMapping(value="lists.html",method=RequestMethod.GET)
	public String discussList(@RequestParam(value = "p", defaultValue = "1")Integer pagenum,ModelMap map){
		pagelist = udiscussService.getPaginationInfo(pagenum, pagesize);
		map.put("list", pagelist);
		return local+"discussList";
	}
}
